package controller

import (
	"server/utils"

	"github.com/beego/beego/v2/server/web"
)

type UserController struct {
	web.Controller
}

func (u *UserController) CreateToken() {
	token := *(&utils.JWT{}).CreateToken(1)
	u.Data["json"] = map[string]string{"token": token}
	u.ServeJSON()
}
